<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var numberA = parseInt(prompt('请输入第一个数'))
    var numberB = prompt('请输入一个运算符')
    var numberC = parseInt(prompt('请输入第二个数'))

    if (numberB==='+'){
        alert(numberA+numberC)
    }
    if (numberB==='-'){
        alert(numberA-numberC)
    }
    if (numberB==='*'){
        alert(numberA*numberC)
    }
    if (numberB==='/'){
        alert(numberA/numberC)
    }

    // function jisuan(numberA,numberB,numberC) {
    //     var num = 0
    //     if (numberB==='+'){
    //         num = numberA+numberC
    //     }
    //     if (numberB==='-'){
    //         num = numberA-numberC
    //     }
    //     if (numberB==='*'){
    //         num = numberA*numberC
    //     }
    //     if (numberB==='/'){
    //         num = numberA/numberC
    //     }
    //     return num
    // }
    // alert(jisuan(numberA,numberB,numberC))
</script>
</html>